package com.ygqh.baby.mapper;

import com.ygqh.baby.ao.CheckStatus;
import com.ygqh.baby.model.VoteWorkListVo;
import com.ygqh.baby.po.YgVoteWork;
import com.ygqh.baby.po.YgVoteWorkExample;
import com.ygqh.baby.ao.QueryInfo;

import java.util.List;

import org.apache.ibatis.annotations.Param;

/**
 * @author Ss
 */
public interface YgVoteWorkMapper {

	int countByExample(YgVoteWorkExample example);

	int deleteByExample(YgVoteWorkExample example);

	int deleteByPrimaryKey(Long id);

	int insert(YgVoteWork record);

	int insertSelective(YgVoteWork record);

	List<YgVoteWork> selectByExample(YgVoteWorkExample example);

	YgVoteWork selectByPrimaryKey(Long id);

	int updateByExampleSelective(@Param("record") YgVoteWork record, @Param("example") YgVoteWorkExample example);

	int updateByExample(@Param("record") YgVoteWork record, @Param("example") YgVoteWorkExample example);

	int updateByPrimaryKeySelective(YgVoteWork record);

	int updateByPrimaryKey(YgVoteWork record);

	int countSuper(@Param("nickName") String nickName, @Param("voteBatchCode") String voteBatchCode, @Param("checkStatus") CheckStatus checkStatus);

	List<YgVoteWork> selectSuper(@Param("queryInfo") QueryInfo queryInfo, @Param("nickName") String nickName, @Param("voteBatchCode") String voteBatchCode,
									 @Param("checkStatus") CheckStatus checkStatus);

	YgVoteWork selectSingle(@Param("voteBatchCode") String voteBatchCode, @Param("userId") Long userId, @Param("checkStatus") CheckStatus[] checkStatus);

	int updateVoteCountToUp(Long id);

	List<VoteWorkListVo> selectLeader(@Param("voteBatchCode") String voteBatchCode, @Param("limit") Integer limit);

	List<VoteWorkListVo> selectList(@Param("queryInfo") QueryInfo queryInfo, @Param("babyName") String babyName, @Param("voteBatchCode") String voteBatchCode,
									@Param("checkStatus") CheckStatus checkStatus);
}



